//
//  UserDefaults.h
//  s.
//
//  Created by pro on 2021/1/19.
//  Copyright © 2021 hailuo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "UserModel.h"
NS_ASSUME_NONNULL_BEGIN

@interface UserDefaults : NSObject
#pragma mark - DriverModel
/* 保存DriverModel */
+(void)saveUserModel:(UserModel *)userModel;
/* 取出DriverModel */
+(UserModel *)fetchUserModel;
/* 清空DriverModel **/
+(void)removeUserModel;

+(void)savePayPassword:(NSString *)unit;
+(NSString *)fetchPayPassword;


+ (NSDictionary *)fetchDefaultAddress;
+ (void)saveDefaultAddress:(NSDictionary *)address;

///  货币单位数组
+ (NSArray *)fetchMoneyEnum;

/// 根据货币单位的enum值
/// - Parameter Enum: 货币单位
+ (int)fetchMoneyEnumbyText:(NSString *)Enum;

/// 根据enum值获取货币单位
/// - Parameter Enum: enum
+ (NSString *)fetchMoneyByEnum:(int)Enum;

/// 获取当前的货币单位enum
+ (int)fetchMoneyEnumValue;

///  保存当前的货币单位enum
+ (void)saveMoneyEnumValue:(int)value;


/// 获取货币币种
/// - Parameter type: type
+ (NSString *)fetchMoneyType:(int)type;

/// 获取货币符号
+ (NSString *)fetchCurrencySymbol;

+ (NSString *)fetchSymbol:(int)type;

+(void)saveToken:(NSString *)IntervalNum;
+(NSString *)fetchToken;

+(void)saveLanguage:(NSString *)language;
+(NSString *)fetchLanguage;

//+(void)saveUnit:(NSString *)unit;
//+(NSString *)fetchUnit;
+(BOOL)fetchVip;

+(void)saveFaceIDOpen:(NSString *)unit;
+(BOOL)fetchFaceIDOpen;

+(void)saveSetFaceID:(NSString *)unit;
+(BOOL)fetchSetFaceID;

#pragma mark - ConfigDic
+(void)saveConfigDic:(NSDictionary *)configDic;
+(NSDictionary *)fetchConfigDic;


+ (void)clearLocalInfo;

@end

NS_ASSUME_NONNULL_END
